package projectchumashgeniusproject;

import java.io.Serializable;
import java.util.Objects;

public class Word implements Serializable
{
    private int wordNum;
    private String word, wordTranslation, root, rootTranslation;

    public Word(int wn, String w, String r, String wt, String rt)
    {
        this.wordNum = wn;
        this.word = w;
        this.wordTranslation = wt;
        this.root = r;
        this.rootTranslation = rt;
    }
    public int getWordNumber()
    {
        int wn = wordNum;
        return wn;
    }
    public String getWord()
    {
        return word;
    }
    public String getWordTranslation()
    {
        return wordTranslation;
    }
    public String getRoot()
    {
        return root;
    }
    public String getRootTranslation()
    {
        return rootTranslation;
    }
    @Override
    public int hashCode()
    {
        int hash = 7;
        hash = 61 * hash + this.wordNum;
        hash = 61 * hash + Objects.hashCode(this.word);
        hash = 61 * hash + Objects.hashCode(this.wordTranslation);
        hash = 61 * hash + Objects.hashCode(this.root);
        hash = 61 * hash + Objects.hashCode(this.rootTranslation);
        return hash;
    }
    @Override
    public boolean equals(Object obj)
    {
        if (obj == null)
            return false;
        if (getClass() != obj.getClass())
            return false;
        
        final Word other = (Word) obj;
        
        if (!Objects.equals(this.word, other.word))
            return false;
        if (!Objects.equals(this.wordTranslation, other.wordTranslation))
            return false;
        if (!Objects.equals(this.root, other.root))
            return false;
        if (!Objects.equals(this.rootTranslation, other.rootTranslation))
            return false;
        
        return true;
    }
}